const path = require('path')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
module.exports = {
    entry: path.join(__dirname, './src/main.js'),
    output: {
        path: path.join(__dirname, './dist'),
        filename: 'bundle.js'
    },
    mode: "development",
    module: {
        rules: [{
                test: /\.vue$/,
                use: 'vue-loader'
            },
            {test:/\.css$/,use:['style-loader','css-loader']},
            {
                /*  处理less规则 */
                 test:/\.sass$/,use:['style-loader','css-loader','sass-loader'],
             },
             {
                /*  处理less规则 */
                 test:/\.scss$/,use:['style-loader','css-loader','less-loader'],
             },
             {
                 test:/\.(ttf|eot)$/,use:'url-loader'
             },
             {
                test:/\.(jpg|jpeg|bmp|gif|png)$/,use:'url-loader'
            },
            
             {test:/\.js$/,use:'babel-loader',exclude:/node_modules/}
        ]
    },
    plugins: [
        // make sure to include the plugin for the magic
        new VueLoaderPlugin()
    ]
}